<template>
	<view class="orderdetail">
		<view class="header">
			<view class="no">
				<text>物流单号:{{db.tracking_num}}</text>
				<text class="copy">复制</text>
			</view>
			<view class="address">
				<view>
					<text class="name">{{db.receipt_name}}</text>
					<text>{{db.receipt_phone}}</text>
				</view>
				<view>{{db.receipt_city}}{{db.receipt_address}}</view>
			</view>
		</view>
		<view class="shop">
			<view class="tit">
				<text>订单编号:{{db.orderno}}</text>
				<text>{{db.order_status}}</text>
			</view>
			<view class="info">
				<image v-if="vuex_httpImageUrl" :src="vuex_httpImageUrl+'/static/index/test/test1.png'" mode="aspectFill"></image>
				<view>
					<view class="name">{{db.goods_name}}</view>
					<view class="cont">
						<view class="specs">
							<text>{{db.goods_format}}</text> X 
							<text>{{db.goods_num}}</text>
						</view>
						<view class="price">￥{{db.goods_total}}</view>
					</view>
				</view>
			</view>
			<view class="bottom">
				备注：{{db.message}}
			</view>
		</view>
		<view class="time">
			<view>创建时间：{{db.createtime || ''}}</view>
			<view>发货时间：{{db.pushtime || ''}}</view>
			<view>确认收获时间：{{db.contime || ''}}</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				db:{}
			};
		},
		onLoad(o) {
			this.db = JSON.parse(decodeURIComponent(o.db))
		}
	}
</script>

<style lang="scss">
	.orderdetail {
		padding: 30rpx;
		box-sizing: border-box;

		>view {
			background-color: #FFFFFF;
			padding: 30rpx;
			margin-bottom: 20rpx;
			border-radius: 20rpx;
			
			&.header {
				font-weight: bold;
				font-size: 24rpx;

				.no {
					display: flex;
					align-items: center;
					justify-content: space-between;
					.copy{
						color: #F38734;
						border: 1px solid #F38734;
						padding: 5rpx 20rpx;
						border-radius: 10rpx;
					}
				}

				.address {
					.name {
						font-size: 32rpx;
					}
				}
			}
	
			&.shop{
				image{
					border-radius: 10rpx;
					width: 120rpx;
					height: 120rpx;
					margin-right: 15rpx;
				}
				>view{
					display: flex;
					align-items: center;
					&.tit{
						justify-content: space-between
					}
					&.info{
						border-top: 1px solid rgba(0,0,0,.05);
						border-bottom: 1px solid rgba(0,0,0,.05);
						padding: 20rpx 0 ;
						margin: 20rpx 0;
						>view{
							flex: 1;
							.name{
								font-weight: bold;
							}
							.cont{
								display: flex;
								align-items: center;
								justify-content: space-between;
							}
						}
					}
				}
			}
		}
	}
</style>
